Repository navigation
Q20: L3/L4 discrimination, hardpoint wiring, kinematics_attached (trace schema 0.4) - #14
Merged
Merged
Conversation
…_lab KinematicFourteenDOFDynamics overrides level() and nothing else, and attach_front/rear_kinematics dynamic_cast to the shared base, so the level label never discriminates: bare L4 is bit-identical to bare L3, and L3 with hardpoints is bit-identical to L4 with hardpoints. The attach is the discriminator. Four resident checks in test_experiment_api keep that fact measured rather than remembered. vdsim_lab could not attach at all (0 call sites), so Experiment/Simulation/Sim went through one new seam, _build_session(), which resolves a hardpoint reference the same way cosim/realtime_server.cpp resolve_susp_yaml() does and refuses instead of skipping: a missing YAML raises FileNotFoundError, a non-Ld3 level raises RuntimeError. Two bindings accept native hardpoint YAML (the existing pair only took a lookup CSV, and no CSV assets exist). H2 came out the opposite way from reading the source: world_scenario.cpp only parses an explicit front_susp key, but load_scene() materializes blueprints through python/catalog/materialize.py, which does carry front_chassis / rear_chassis across. configs/scenes/l4_sedan_kinematics.yaml is therefore a backed L4, not a false label, and the new gtest pins that. docs/VALIDATION.md goes back to PENDING: the registered count moves 505 -> 506.
Schema 0.4 adds one required manifest field, kinematics_attached. It follows the 0.1 -> 0.2 role precedent: SCHEMA_VERSION 0.4, READABLE adds 0.4, a 0.4 manifest without the field (or with a non-bool) is a TraceSchemaError, and a 0.1-0.3 trace reads as unknown (None, never False) with one warning raised on first access. TraceWriter takes it as a keyword-only argument with no default. The 0.3 gates now apply to 0.3 and later instead of == "0.3". The value comes from what the attach returned. Experiment therefore stages its writer in enable_trace() and opens it in run() once _build_session() has attached; finalize_trace() before run() raises instead of inventing a state. VDSimPlant has no attach call and records false. golden_v0_3.vdtrace is untouched and its maker now refuses to run past 0.3. golden_v0_4.vdtrace re-declares the same channels, sample for sample, under the 0.4 writer with kinematics_attached false. H1: _build_session() raises ValueError for level L4 with nothing attached, naming kin=... and level='L3'. It is the seam every vdsim_lab path shares, so traced and untraced runs are covered alike. L3 with hardpoints stays legal. The bare-L3 == bare-L4 fact is still measured, one layer down on the raw session factory, and cross-checked against Sim so the probe cannot drift. C-1 (v): with bare L4 refused at the seam, the campaign level axis is no longer forbidden. FORBIDDEN_AXES is empty; a bare L4 run in a level sweep is an error row with no trace. Campaign docs and mu_sweep.yaml say so. No new ctest target: the checks live in trace_schema_0_3, experiment_api and campaign_runner. Registration surface untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…README 0.4
(A) VDSimPlant has no hardpoint input, so level='L4' raises ValueError with
the same leading reason as vdsim_lab._build_session; a test compares them.
(B) Experiment.from_config reads kinematics: {front, rear} and hands it to
Experiment.kinematics(); resolution stays in resolve_susp_kinematics().
Campaign regression: an L3 cell and an L4 cell with hardpoints both run
and their channels are not bit-identical.
(C) README / README.ko: the writer emits schema 0.4; document
kinematics_attached and the L4 refusals.
No new ctest target.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ovenance # Conflicts: # docs/VALIDATION.md # tests/scripts/test_experiment_api.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Q20 — L3/L4 discrimination, hardpoint wiring,
kinematics_attached(schema 0.4)Decisions: 18_dev_briefing_0903 §51 / §53, 04 decisions 101–103 and 107–109.
What changes
vdsim_lab._build_session()is the single seam for Experiment / Simulation / Sim;resolve_susp_kinematics+attach_kinematics; bindingsattach_{front,rear}_kinematics_from_yaml. Missing YAML →FileNotFoundError, non-L3/L4 →RuntimeError. Provenance records stems only.kinematics_attachedrequired. 0.4 missing →TraceSchemaError; 0.3 and older → one warning, value unknown (neverFalse).golden_v0_3.vdtraceuntouched,golden_v0_4.vdtraceadded. Value comes from the attach return, not from YAML presence._build_session()refuseslevel="L4"with nothing attached (ValueError, message nameskin=…/level='L3').FORBIDDEN_AXESemptied — level axis re-enabled now that H1 blocks false labels.VDSimPlant(level="L4")refused with the same leading reason.Experiment.from_configreadskinematics: {front, rear}viaresolve_susp_kinematics(no copy).(iv) cosim
attach_susp_partssilent downgrade is not in this PR (separate PR, decision 109).Registration surface and expected count
mainby merge (no rebase, decision 98). Merge commit6e2592f, parents00b1401/daa2a80.main(CMakePresets.json, all CMakeLists.txt, cmake/**): 0 files.gtest_discover_tests→ expected registered count 506 (main canonical 505 + 1).docs/VALIDATION.mdcurrency isPENDING; filled only after 3 consecutive equal CI runs on a fixed head.Local evidence (candidate values, not canonical)
ctest -N: Total Tests: 506. Serial full run ×2:100% tests passed, 0 tests failed out of 506.Out-of-scope observation (not fixed here)
With
ctest -j8,import_part_packfailed once becausetests/scripts/test_part_store.pycreates and deletes a temporary part under the sharedconfigs/catalog/packages/gui_custom/tree while another test lists the catalog. The canonicalvalidationtest preset runs serially, so the canonical measurement is unaffected. Reported for a separate decision.🤖 Generated with Claude Code